.discover-page {
  padding-bottom: 60px;
  background-color: #f8f8f8;
  min-height: 100vh;
}

.discover-header {
  background-color: #fff;
  padding: 15px;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
}

.home-button {
  align-self: flex-start;
  font-size: 14px;
  margin-bottom: 10px;
  padding: 6px 12px;
  background-color: #ff2c55;
  border-radius: 16px;
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.search-bar {
  display: flex;
  align-items: center;
  background-color: #f5f5f5;
  border-radius: 20px;
  padding: 8px 15px;
  margin-bottom: 15px;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
  transition: all 0.2s ease;
}

.search-bar:focus-within {
  background-color: #fff;
  box-shadow: 0 0 0 2px rgba(255, 44, 85, 0.2), inset 0 1px 3px rgba(0, 0, 0, 0.1);
}

.search-icon {
  margin-right: 10px;
  color: #999;
}

.search-input {
  flex: 1;
  border: none;
  background: transparent;
  outline: none;
  font-size: 14px;
  color: #333;
}

.search-input::placeholder {
  color: #999;
}

.category-tabs {
  display: flex;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  margin: 0 -15px;
  padding: 0 15px;
}

.category-tabs::-webkit-scrollbar {
  display: none;
}

.category-tab {
  padding: 10px 15px;
  font-size: 15px;
  white-space: nowrap;
  color: #666;
  position: relative;
  transition: all 0.2s ease;
  cursor: pointer;
}

.category-tab.active {
  color: #ff2c55;
  font-weight: bold;
}

.category-tab.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 20px;
  height: 3px;
  background-color: #ff2c55;
  border-radius: 3px;
}

/* 新增分类指示器样式 */
.category-indicator {
  position: absolute;
  bottom: -2px;
  left: 50%;
  transform: translateX(-50%);
  width: 20px;
  height: 3px;
  background-color: #ff2c55;
  border-radius: 3px;
  animation: indicatorFadeIn 0.3s ease;
}

@keyframes indicatorFadeIn {
  from {
    opacity: 0;
    width: 0;
  }
  to {
    opacity: 1;
    width: 20px;
  }
}

/* 空内容样式 */
.empty-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 30px 0;
  background-color: rgba(255, 255, 255, 0.8);
  border-radius: 12px;
  margin: 10px 0;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  animation: fadeIn 0.5s ease;
}

.empty-icon {
  font-size: 32px;
  margin-bottom: 15px;
  opacity: 0.6;
}

.empty-text {
  color: #999;
  font-size: 15px;
  text-align: center;
}

.content-section {
  padding: 15px;
}

.section-title {
  font-size: 18px;
  font-weight: bold;
  margin-bottom: 15px;
  color: #333;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.see-all {
  font-size: 14px;
  color: #ff2c55;
  font-weight: normal;
  cursor: pointer;
  transition: all 0.2s ease;
}

.see-all:hover {
  opacity: 0.8;
  text-decoration: underline;
}

/* 直播滑动容器 */
.live-swipe-container {
  position: relative;
  width: 100%;
  margin: 10px 0;
  padding: 5px 0;
}

.live-list {
  display: flex;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  gap: 12px;
  padding-bottom: 10px;
  margin: 0 -15px;
  padding-left: 15px;
  padding-right: 15px;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch; /* 平滑滚动效果 */
}

.live-list::-webkit-scrollbar {
  display: none;
}

/* 直播卡片包装器 */
.live-card-wrapper {
  flex: 0 0 auto;
  width: 150px;
  scroll-snap-align: start;
  transition: all 0.3s ease;
  transform-origin: center;
}

.live-card-wrapper.active-live {
  transform: scale(1.05);
  z-index: 5;
}

/* 导航按钮 */
.live-nav-button {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 30px;
  height: 30px;
  background-color: rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  z-index: 10;
  transition: all 0.2s ease;
  color: #ff2c55;
  font-weight: bold;
}

.live-nav-button:hover {
  background-color: #ff2c55;
  color: white;
  box-shadow: 0 4px 12px rgba(255, 44, 85, 0.3);
}

.live-prev {
  left: 5px;
}

.live-next {
  right: 5px;
}

/* 导航指示器 */
.live-indicators {
  display: flex;
  justify-content: center;
  margin-top: 10px;
  gap: 8px;
}

.live-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #ddd;
  cursor: pointer;
  transition: all 0.3s ease;
}

.live-indicator.active {
  width: 20px;
  border-radius: 4px;
  background-color: #ff2c55;
}

/* 渐入效果 */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* 移动设备优化 */
@media (max-width: 768px) {
  .live-nav-button {
    width: 24px;
    height: 24px;
    font-size: 12px;
  }
  
  .live-card-wrapper {
    width: 130px;
  }
  
  .live-indicator {
    width: 6px;
    height: 6px;
  }
  
  .live-indicator.active {
    width: 16px;
  }
}

.video-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-top: 15px;
}

.video-card {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  background-color: #000;
  aspect-ratio: 9/16;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.video-card:hover, 
.video-card.hovered,
.video-card.touched,
.video-card.swiping {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.video-card.playing::before {
  content: '';
  position: absolute;
  top: 10px;
  right: 10px;
  width: 8px;
  height: 8px;
  background-color: #ff2c55;
  border-radius: 50%;
  animation: pulse 1s infinite;
  z-index: 5;
}

.video-thumb {
  width: 100%;
  height: 100%;
  position: relative;
}

.video-thumb img,
.video-thumb video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.video-card:hover .video-thumb img,
.video-card.hovered .video-thumb img,
.video-card.touched .video-thumb img,
.video-card.swiping .video-thumb img {
  transform: scale(1.05);
}

.video-info-overlay {
  position: absolute;
  bottom: 10px;
  left: 10px;
  right: 10px;
  color: #fff;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
  z-index: 3;
  background-color: rgba(0, 0, 0, 0.3);
  padding: 8px;
  border-radius: 8px;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.video-user-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 5px;
}

.video-username {
  font-weight: bold;
  font-size: 14px;
  margin-bottom: 5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.video-likes {
  font-size: 12px;
  display: flex;
  align-items: center;
}

/* 小号关注按钮样式 */
.follow-btn-small {
  background-color: #ff2c55;
  color: #fff;
  border: none;
  border-radius: 20px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: bold;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(255, 44, 85, 0.4);
  transition: all 0.2s ease;
}

.follow-btn-small:hover {
  transform: scale(1.05);
  background-color: #ff1a48;
  box-shadow: 0 4px 12px rgba(255, 44, 85, 0.6);
}

/* 已关注状态 */
.follow-btn-small.following {
  background-color: transparent;
  border: 1px solid #fff;
  color: #fff;
  box-shadow: 0 2px 8px rgba(255, 255, 255, 0.2);
}

.follow-btn-small.following:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

.like-icon {
  margin-right: 4px;
  font-size: 14px;
}

.play-button-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: rgba(0, 0, 0, 0.2);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.video-card:hover .play-button-overlay,
.video-card.hovered .play-button-overlay {
  opacity: 1;
}

.play-button {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background-color: rgba(255, 44, 85, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 24px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  transition: transform 0.2s ease, background-color 0.2s ease;
}

.play-button:hover {
  transform: scale(1.1);
  background-color: rgba(255, 44, 85, 1);
}

.loading-indicator {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: rgba(0, 0, 0, 0.3);
}

.loading-indicator::after {
  content: '';
  width: 30px;
  height: 30px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

.video-error-message {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: rgba(0, 0, 0, 0.7);
  color: #fff;
  font-size: 14px;
}

.tiktok-id {
  position: absolute;
  bottom: 10px;
  right: 10px;
  color: rgba(255, 255, 255, 0.8);
  font-size: 12px;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
  z-index: 4;
}

.refresh-btn {
  position: fixed;
  bottom: 80px;
  right: 15px;
  width: 40px;
  height: 40px;
  background-color: #ff2c55;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 20px;
  box-shadow: 0 2px 10px rgba(255, 44, 85, 0.4);
  cursor: pointer;
  z-index: 90;
  transition: all 0.3s ease;
  transform: rotate(0deg);
}

.refresh-btn.refreshing {
  animation: spin 1s linear infinite;
}

.refresh-btn:hover {
  transform: scale(1.1) rotate(30deg);
  box-shadow: 0 4px 15px rgba(255, 44, 85, 0.6);
}

.refresh-btn:active {
  transform: scale(0.95);
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* 取消关注确认对话框覆盖层 */
.video-card .confirm-dialog-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1001;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  animation: fadeIn 0.2s ease;
}

/* 确认对话框 */
.video-card .confirm-dialog {
  background-color: white;
  border-radius: 16px;
  width: 80%;
  max-width: 320px;
  overflow: hidden;
  animation: slideUp 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

/* 确认对话框标题 */
.video-card .confirm-dialog-title {
  padding: 24px 20px;
  text-align: center;
  font-size: 18px;
  font-weight: bold;
  color: #333;
  border-bottom: 1px solid #eee;
}

/* 确认对话框按钮容器 */
.video-card .confirm-dialog-buttons {
  display: flex;
  border-top: 1px solid #eee;
}

/* 确认对话框按钮 */
.video-card .confirm-dialog-buttons button {
  flex: 1;
  padding: 16px 0;
  border: none;
  background: white;
  font-size: 16px;
  cursor: pointer;
  transition: background-color 0.2s;
}

.video-card .confirm-dialog-buttons button:hover {
  background-color: #f5f5f5;
}

/* 取消按钮 */
.video-card .confirm-dialog-cancel {
  color: #333;
  border-right: 1px solid #eee;
}

/* 确认按钮 */
.video-card .confirm-dialog-confirm {
  color: #ff2c55;
  font-weight: bold;
}

.video-card .confirm-dialog-confirm:hover {
  background-color: rgba(255, 44, 85, 0.05) !important;
}

@keyframes slideUp {
  from { transform: translateY(50px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

@media screen and (min-width: 768px) {
  .video-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media screen and (min-width: 1024px) {
  .video-grid {
    grid-template-columns: repeat(5, 1fr);
  }
} 

/* 视频分类标签样式 */
.video-category-tag {
  position: absolute;
  top: 10px;
  left: 10px;
  background-color: rgba(255, 44, 85, 0.8);
  color: white;
  padding: 4px 10px;
  border-radius: 15px;
  font-size: 12px;
  font-weight: bold;
  z-index: 5;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  animation: fadeIn 0.3s ease;
}

.video-card:hover .video-category-tag {
  background-color: rgba(255, 44, 85, 1);
  transform: translateY(-2px);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.3);
} 

/* 直播卡片滑动动画 */
@keyframes slideIn {
  from {
    transform: translateX(30px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

.live-card-wrapper {
  animation: slideIn 0.3s ease-out;
}

/* 活跃直播卡片动画 */
@keyframes pulse-active {
  0% { box-shadow: 0 0 0 0 rgba(255, 44, 85, 0.4); }
  70% { box-shadow: 0 0 0 10px rgba(255, 44, 85, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 44, 85, 0); }
}

.live-card-wrapper.active-live .live-card {
  animation: pulse-active 2s infinite;
  border: 2px solid #ff2c55;
} 